/*
 * InfrastructureMap.h
 *
 *  Created on: Nov 20, 2008
 *      Author: Ryan
 */

#ifndef INFRASTRUCTUREMAP_H_
#define INFRASTRUCTUREMAP_H_

#include "../InterfaceIncludes.h"

typedef std::list< std::pair< OOInterface::ConstUnitPtr, OOInterface::Point3f > > BuildingLocPairs;

class InfrastructureMap
{
public:
	InfrastructureMap( const OOInterface::GameMap& gameMap );
	virtual ~InfrastructureMap();

	bool canBuildAt( OOInterface::ConstUnitPtr building, OOInterface::Point3f loc );
	OOInterface::Point3f findNearbyBuildLocation( OOInterface::ConstUnitPtr building, OOInterface::Point3f loc );

	bool buildBuilding( OOInterface::ConstUnitPtr building );
	bool buildBuilding( OOInterface::ConstUnitPtr building, OOInterface::Point3f loc );
	void destroyBuilding( OOInterface::ConstUnitPtr building );
	bool isAreaEmpty( OOInterface::ConstUnitPtr building, OOInterface::Point3f loc );

	const BuildingLocPairs& getBuiltBuildings() { return _buildings; }
private:
	const OOInterface::GameMap& _gameMap;

	BuildingLocPairs _buildings;

};

#endif /* INFRASTRUCTUREMAP_H_ */
